<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>康纳天花系统后台</title>
<link href="/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="/css/admins/base.css" rel="stylesheet" type="text/css">
<link href="/css/plugs/jDatepicker/jDatepicker-min.css"  rel="stylesheet"  /> 
<script src="/js/plugs/jquery.js"></script>
<script src="/js/admins/friendly_links.js"></script>
<script src="/js/admins/base.js"></script>
<script src="/js/plugs/jDatepicker/jDatepicker-min.js"></script>
<script src="/js/plugs/global.js"></script>
<script src="/js/plugs/ymlayer.min.js"></script>

<style type="text/css" >
    {#$pageCss#}
		.form-br {
	display: block; margin-top: 12px; margin-left: 10px;
}
</style>
</head>

<body>

<!-- nav start-->
{# include file="$tpl_root_path/admins/base/navbar.html" #}
<!-- nav end -->    
   
<div class="container-fluid">
    
      <div class="row">
      
    <!-- left  box start-->     
       {# include file="$tpl_root_path/admins/base/left_menu.html" #}
    <!-- left  box end-->        
 
  <!-- right  box start-->  
         
     <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main right-box">
          
          <div class="menu-navbar">{#$menu_navbar#}</div>
          <h3 class="page-header">友情链接管理</h3>

 
<div class="search-box">
 
              <form class="form-inline" id="admin_news_form" action="/admins/friendly_links.html" name="admin_news_form" enctype="multipart/form-data" method="GET">
                <div class="form-group">
                  <label>发布时间:&nbsp;</label>
                  <div class="input-right-gicos">
                    <span class="ico input-ico-calendar"></span>
                    <input class="form-control" readonly="readonly" id="start_datepicker"   placeholder="开始时间" value="{#$jts|date_format:'%Y-%m-%d'#}" type="text" name="jts" data-name="jts">
                 </div>
                </div>
                
                <div class="form-group">
                  <label>&nbsp;至&nbsp;</label>
                  <div class="input-right-gicos">
                    <span class="ico input-ico-calendar"></span>
                    <input class="form-control" readonly="readonly" id="end_datepicker"   placeholder="结束时间" value="{#$jte|date_format:'%Y-%m-%d'#}" type="text" name="jte" data-name="jte">
                 </div>
                </div>
                
                
                

                
                
                <div class="form-group">
                  <label>&nbsp;状态:&nbsp;</label>
                  <select class="form-select" id="state" name="state" data-name="state">
                    <option selected="" value="">请选择</option>
                   <option value="2" {#if $state==='pass'#}selected="selected"{#/if#}> 审核通过 </option>
                    <option value="1" {#if $state==='nopass'#}selected="selected"{#/if#}>审核未通过</option>
                    <option value="0" {#if $state==='wait'#}selected="selected"{#/if#}>未审核</option>
                  </select>
                </div>



             <div class="form-br">


                <div class="submit-box">
                   <button  type="submit" class="btn btn-success" id="form-submit">查&nbsp;询</button>
                </div>

             </div>

              </form>
          </div>

         <div class="tool-list-box">
             <a href="/admins/friendly_links-cmd-increase.html"   class="btn btn-warning">发布友情链接</a>
         </div>




          <div class="info-list-box">
          <table class="table table-hover">
              <thead>
                <tr>
                  <!--<th width="250">本站被友链URL</th>-->
                  <th width="250">网站名称</th>
                  <!--<th width="250">放置链接</th>-->
                  <!--<th width="250">域名提交人</th>-->

                  <th width="150">对方友链URL</th>
                    <th width="150">申请时间</th>
                  <th width="100">审核状态</th>
                  <th width="150">操作</th>
                </tr>
              </thead>
              <tbody>
              {#if $classify_list#}
              {#foreach from=$classify_list item=i#}
                <tr>
                  <!--<td>{#$i.MY_LINK_URL#}</td>-->
                  <td>{#$i.SITENAME#}</td>
                  <!--<td>{#$i.PLACE_MY_URL#}</td>-->
                    <!--<td>{#$i.PLACE_MY_URL#}</td>-->
                    <td>{#$i.LINK_URL#}</td>
                  <td>{#$i.DATELINE|date_format:'%Y-%m-%d %H:%M:%S'#}</td>
                  <td>
                  {#if $i.CHECKSTATE==0#}
                  <span>未审核</span>
                  {#elseif $i.CHECKSTATE==1#}
                 <span class="status-cancel"> 未通过</span>
                  {#elseif $i.CHECKSTATE==2#}
                 <span class="status-normal"> 已通过</span>
                  {#/if#}</td>
                    <td id="hot">
                   <div>  <a href="/admins/friendly_links-cmd-increase-id-{#$i.ID#}.html" target="_blank">编辑</a></div>
                 {#if $i.CHECKSTATE==2#}
                      <div>  <a href="javascript:;" id="cancel-status-btn" class="cancel-status" data-id = "{#$i.ID#}">不通过</a> </div>
                      {#elseif $i.CHECKSTATE==1#}  
                       <div> <a href="javascript:;" id="initiate-status-btn" class="initiate-status" data-id = "{#$i.ID#}">通过</a>  </div>
                      {#/if#}

                   <div> <a href="javascript:;"  data-id="{#$i.ID#}" id="cancel-hot-btn"   onclick="del({#$i.ID#})"  class="cancel-hot"  >删除</a></div>



                </tr>

              {#/foreach#}
              {#else#}
              <tr>
                  <td colSpan="5"  align="center">
                      <span class="no-result">没有找到相关信息</span>
                  </td>
              </tr>
              {#/if#}
                
              </tbody>
            </table>
          </div>


         <div  id="pages">
             {#$pageform#}
         </div>



          
     </div>
 
  <!-- right  box end-->         
        
      </div>
</div>



</body>
</html>



<script type="text/javascript">

    /*删除*/
    function del(id){
        var id =id;

        if (typeof id == 'undefined'){
            return false;
        }

//        ymlayer.confirm('您确定要删除？',function(){

                    $.ajax({
                        type:"POST",
                        url:"/admins/friendly_links-cmd-del.html",
                        data:{'id':id},
                        dataType:"json",
                        success:function(data){
                            if (data == 1) {
                                gMember.checkbox();
                                ymlayer.msg('删除成功！',1,9);
                                document.location.reload();
                            }else if(data == 2){
                                ymlayer.msg('删除失败！',1,9);
                            }else {
                                ymlayer.msg('删除失败！',1);
                            }
                        }
                    });
//                },'系统提示',function(index){ymlayer.close(index);}
//        )
    }






</script>